//
//  BaseViewController.m
//  progress
//
//  Created by 陶宏路 on 16/7/5.
//  Copyright © 2016年 陶路路. All rights reserved.
//

#import "BaseViewController.h"
#import "UIViewController+JASidePanel.h"
@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    [self setUpUI];

}

-(void)setUpUI{
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.navigationController.navigationBar.barTintColor = HOMECOLOR;
}

-(void)setUpButton{
    
    UIButton * button = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 50, 50)];
    
    [button setImage:[UIImage imageNamed:@"JianTou"] forState:UIControlStateNormal];
    
    [button addTarget:self action:@selector(jumpToOtherController:) forControlEvents:UIControlEventTouchUpInside];
    
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:button];
    
}


- (UINavigationController *)centerNavigationController{
    
    return (UINavigationController *)self.sidePanelController.centerPanel;;
}


- (UIViewController *)leftMenuViewController{
    
    return self.sidePanelController.leftPanel;
}

-(void)jumpToOtherController:(UIViewController*)controller{
    
    [self.navigationController pushViewController:controller animated:YES];
    
}


@end
